home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 25 / AMIGAplus Sonderheft 25 (2000)(Falke)(DE)(Track 1 of 4)[!].iso / Updates / HD-Installer / Fears / FearsInstall < prev    next >
Text File  |  1999-04-11  |  3KB  |  167 lines

  1. ;Patcher-install-script for Gore-Design-Installs
  2. ;****************************
  3.  
  4. (set #readme-file (cat @app-name ".Txt"))    ; name of readme file
  5. (set #cleanup "")                ; files to delete after install
  6. (set #last-file "Disk.3")            ; last file imager should create
  7.  
  8. ;****************************
  9. ;----------------------------
  10. ; Checks if given program is reachable via the path
  11. ; if not abort install
  12. ; IN:  #program - to check
  13. ; OUT: -
  14.  
  15. (procedure P_chkrun
  16.   (if
  17.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  18.     ("")
  19.     (abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the WHDLoad package." #program))
  20.   )
  21. )
  22.  
  23. ;****************************
  24.  
  25. (set #program "WHDLoad")
  26. (P_chkrun)
  27.  
  28. (set #program "Patcher")
  29. (P_chkrun)
  30.  
  31. (if
  32.   (exists #readme-file)
  33.   (if 
  34.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  35.     ("")
  36.     (run ("SYS:Utilities/More %s" #readme-file))
  37.   )
  38. )
  39.  
  40. (if
  41.   (= @user-level 2)
  42.   (
  43.     (set #CI_drive
  44.       (askchoice
  45.     (prompt "Select source drive for diskimages")
  46.     (default 0)
  47.     (choices "DF0:" "DF1:" "DF2:" "DF3:")
  48.     (help @askchoice-help)
  49.       )
  50.     )
  51.     (if
  52.       (= #CI_drive 0)
  53.       (set #CI_drive "DF0:")
  54.     )
  55.     (if
  56.       (= #CI_drive 1)
  57.       (set #CI_drive "DF1:")
  58.     )
  59.     (if
  60.       (= #CI_drive 2)
  61.       (set #CI_drive "DF2:")
  62.     )
  63.     (if
  64.       (= #CI_drive 3)
  65.       (set #CI_drive "DF3:")
  66.     )
  67.   )
  68.   (
  69.     (set #CI_drive "DF0:")
  70.   )
  71. )
  72.  
  73. (set @default-dest
  74.   (askdir
  75.     (prompt ("Where should \"%s\" be installed ?\nA drawer \"%s\" will automatically be created." @app-name @app-name))
  76.     (help @askdir-help)
  77.     (default @default-dest)
  78.     (disk)
  79.   )
  80. )
  81. (set #dest (tackon @default-dest @app-name))
  82. (if
  83.   (exists #dest)
  84.   (
  85.     (set #choice
  86.       (askbool
  87.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  88.         (default 1)
  89.         (choices "Delete" "Skip")
  90.         (help @askbool-help)
  91.       )
  92.     )
  93.     (if
  94.       (= #choice 1)
  95.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  96.     )
  97.   )
  98. )
  99. (makedir #dest
  100.   (help @makedir-help)
  101. )
  102. (copyfiles
  103.   (help @copyfiles-help)
  104.   (source ("/%s.info" @app-name ))
  105.   (dest @default-dest)
  106. )
  107.  
  108. ;----------------------------
  109.  
  110. (copyfiles
  111.   (help @copyfiles-help)
  112.   (source ("%s.info" @app-name ))
  113.   (dest #dest)
  114. )
  115. (copyfiles
  116.   (help @copyfiles-help)
  117.   (source ("%s.Slave" @app-name ))
  118.   (dest #dest)
  119. )
  120. (copyfiles
  121.   (help @copyfiles-help)
  122.   (source ("%sInstall.info" @app-name ))
  123.   (dest #dest)
  124. )
  125. (copyfiles
  126.   (help @copyfiles-help)
  127.   (source ("%sInstall" @app-name ))
  128.   (dest #dest)
  129. )
  130. (copyfiles
  131.   (help @copyfiles-help)
  132.   (source ("%s.Imager" @app-name ))
  133.   (dest #dest)
  134. )
  135. (if
  136.   (exists #readme-file)
  137.   (
  138.     (copyfiles
  139.       (help @copyfiles-help)
  140.       (source #readme-file)
  141.       (dest #dest)
  142.     )
  143.     (copyfiles
  144.       (help @copyfiles-help)
  145.       (source ("%s.info" #readme-file))
  146.       (dest #dest)
  147.     )
  148.   )
  149. )
  150.  
  151. (run ("Assign \"%s:\" \"%s\"" @app-name #dest))
  152. (run ("Patcher -p%s.Imager -s%s" @app-name #CI_drive))
  153. (run ("Assign \"%s:\" Remove" @app-name))
  154.  
  155. (if
  156.   (exists (tackon #dest #last-file))
  157.   ("")
  158.   (abort "Diskimaging not successful !\nThe Patcher couldn't create all files needed!")
  159. )
  160.  
  161. ;----------------------------
  162.  
  163. (run ("Delete %s ALL QUIET FORCE" #cleanup))    ;delete temporary files
  164.  
  165. (exit)
  166.  
  167.